
#include <gtest/gtest.h>
#include <vector>

#include <base.config.h>
#include "test.base.memory.pool.h"




TEST( base, basic_pool )
{
	test_memory_pool p;

	std::vector<test_memory_pool*> v;
 	
 	ub1 sz1[] = "aaaaa";
 	ub1 sz2[] = "bbbbb";
 
 	for( size_t i =0; i < 10; i++ )
 	{
 		test_memory_pool* a = new test_memory_pool();		
 		v.push_back(a);
 
 		memcpy( a->a, sz1, 6 );
 		memcpy( a->b, sz2, 6 );
 	}
 
 	for( size_t i =0; i < 10; i++ )
 	{
 		delete v[i];
 	}
 
 
 	v.clear();
 
 
 	for( size_t i =0; i < 10; i++ )
 	{
 		test_memory_pool* a = new test_memory_pool();		
 		v.push_back(a);
 		
 		memcpy( a->a, sz1, 6 );
 		memcpy( a->b, sz2, 6 );
 	}
 
 	for ( size_t i =0; i < 10; i++ )
 	{
 		delete v[i];
 	}



}


